#include <QtGui/QApplication>
#include "mainwindow.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.setMinimumSize(370,360);
    w.setMaximumSize(370,360);
    w.Line->setFocus(Qt::OtherFocusReason);
    w.show();
    QObject::connect(w.Line,SIGNAL(cursorPositionChanged(int,int)),&w,SLOT(setFocusBegin()));
    QObject::connect(w.Line,SIGNAL(selectionChanged()),&w,SLOT(setFocusBegin()));
    QObject::connect(&w,SIGNAL(signul()),&w,SLOT(nul()));
    QObject::connect(w.Line, SIGNAL(textChanged(QString)),&w,SLOT(UpdateToolTip()));
    QObject::connect(w.Line,SIGNAL(returnPressed()),&w,SLOT(equal()));

    return a.exec();
}
